Skip to content

refactor: establish SVG folder feature - #330

Open
jderochervlk wants to merge 1 commit into
codex/option5-web-audio-folderfrom
codex/option5-svg-folder
Open

refactor: establish SVG folder feature#330
jderochervlk wants to merge 1 commit into
codex/option5-web-audio-folderfrom
codex/option5-svg-folder

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Tracking issue: #342

Stack context

Part 20 of the Option 5 folder-feature stack.

Review this PR as the incremental diff against #329.

Summary

  • add the target src/svg folder on the unqualified internal SVG feature
  • move SVGElement, SVGGraphicsElement, and SVGLength out of the legacy DOM folder
  • add the supported WebAPI.SVG -> WebAPI.DOMNodes + WebAPI.Geometry + SVG feature
  • preserve all existing flat SVG module paths and binding signatures

Temporary state

  • the legacy broad WebAPI.DOM source entry remains until its remaining interfaces have been assigned
  • Canvas still uses SVGElement and will acquire the SVG feature dependency in its later consolidation PR
  • final feature-graph guardrails and cleanup remain deferred until the stack is complete

Review focus

  • SVG folder membership
  • the DOMNodes/Geometry dependency closure
  • preservation of public module paths

Verification

  • node_modules/.bin/rescript clean
  • node_modules/.bin/rescript build --prod --features DOM,Event,DOMPlatform,Animation,CSSOM,Geometry,DOMNodes,SVG
  • npm run build
  • npm test
  • npm run format:check
  • git diff --check

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c1b67e4c26

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rescript.json
{
"dir": "src/svg",
"subdirs": true,
"feature": "SVG",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make Canvas builds imply the new SVG feature

When a feature-gated build includes WebAPI.Canvas but omits the new WebAPI.SVG feature, moving these modules behind SVG makes Canvas fail because VideoFrame.res, Canvas.res, and CanvasRenderingContext2D.res reference SVGElement. I verified this by enabling every existing source feature except SVG: the parent compiles all 371 modules, while this commit reports that SVGElement cannot be found. Add a Canvas-to-SVG dependency edge so consumers do not need to discover this transitive requirement manually.

Useful? React with 👍 / 👎.

@jderochervlk
jderochervlk force-pushed the codex/option5-svg-folder branch from c1b67e4 to 69a53d2 Compare August 4, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant